Description:
1. Avoid error on nil value by skipping over it
2. Adds a newline to error messages
Signed-off-by: Amos Shapira <[email protected]>
[bump version]
Signed-off-by: Etienne Champetier <[email protected]>
include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus-node-exporter-lua
-PKG_VERSION:=2025.06.08
+PKG_VERSION:=2025.06.23
PKG_RELEASE:=1
function print_metric(metric, labels, value)
local label_string = ""
+ if type(value) == "nil" then
+ return
+ end
if labels then
for label,value in pairs(labels) do
label_string = label_string .. label .. '="' .. value .. '",'
local status, err = pcall(collector.scrape)
if not status then
success = 0
- io.stderr:write(err)
+ io.stderr:write(err .. '\n')
end
return (socket.gettime() - start_time), success
end